<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
            + path;
%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>${title}</title>
    <link href="../images/favicon.ico" rel="shortcut icon" />
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <link rel="stylesheet" href="<%=basePath%>/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="<%=basePath%>/css/font-awesome.min.css">
    <link rel="stylesheet" href="<%=basePath%>/css/ionicons.min.css">
    <link rel="stylesheet" href="<%=basePath%>/dist/css/AdminLTE.css">
    <link rel="stylesheet" href="<%=basePath%>/dist/css/skins/_all-skins.min.css">
    <script src="<%=basePath%>/plugins/jQuery/jquery-2.2.3.min.js"></script>
    <script src="<%=basePath%>/bootstrap/js/bootstrap.min.js"></script>
    <script src="<%=basePath%>/dist/js/app.min.js"></script>
    <script src="<%=basePath%>/bootstrapvalidator/js/bootstrapValidator.min.js"></script>
    <script src="<%=basePath%>/plugins/iziModal/js/iziModal.min.js"></script>
    <style type="text/css">
        .sidebar-menu > li > a{
            padding: 8px;
        }
        @media screen and (max-height: 769px) {
            .main-sidebar {
                max-height: 768px;
                overflow: auto;
            }
        }
    </style>
</head>
<section class="sidebar">
    <div class="user-panel">
        <div class="pull-left image">
            <img src="<%=basePath%>/images/head.jpg" class="img-circle" alt="User Image">
        </div>
        <div class="pull-left info">
            <p>${loginUser.realName}</p>
            <%--<a href="#">管理员</a>--%>
        </div>
    </div>
    <input type="hidden" value="<%=basePath%>" id="baseUrl">
    <ul class="sidebar-menu">
        <li class="active"><a href="<%=basePath%>/index/page"><i class="fa fa-home"></i> <span>主页</span></a></li>
        <c:forEach items="${loginUser.sysUrlList}" var="item">
            <li class="treeview">
                <a href="#">
                    <i class="${item.icon}"></i><span>${item.name}</span> <span class="pull-right-container"> <i class="fa fa-angle-left pull-right"></i></span>
                </a>
                <ul class="treeview-menu">
                    <c:forEach items="${item.lists}" var="items">
                        <c:if test="${items.id == 18}">
                            <li><a href="${items.path}?clientId=${loginUser.userId}&clientName=${loginUser.realName}&isSystem=1"><i class="${items.icon}"></i><span class="menuInfo">${items.name}</span></a></li>
                        </c:if>
                        <c:if test="${items.id != 18}">
                            <li><a href="<%=basePath%>${items.path}"><i class="${items.icon}"></i><span class="menuInfo">${items.name}</span></a></li>
                        </c:if>
                   </c:forEach>
                </ul>
            </li>

        </c:forEach>
       <%-- <li class="treeview">
            <a href="#">
                <i class="fa fa-th"></i><span>设备管理</span> <span class="pull-right-container"> <i class="fa fa-angle-left pull-right"></i></span>
            </a>
            <ul class="treeview-menu">
                <li><a href="<%=basePath%>/device/page"><i class="fa fa-circle-o"></i><span class="menuInfo">设备管理</span></a></li>
            </ul>
        </li>
        <li class="treeview">
            <a href="#">
                <i class="fa fa-file"></i><span>合同管理</span> <span class="pull-right-container"> <i class="fa fa-angle-left pull-right"></i></span>
            </a>
            <ul class="treeview-menu">
                <li><a href="<%=basePath%>/contract/page"><i class="fa fa-circle-o"></i><span class="menuInfo">合同管理</span></a></li>
            </ul>
        </li>

        <li class="treeview">
            <a href="#">
                <i class="fa fa-user"></i><span>服务管理</span> <span class="pull-right-container"> <i class="fa fa-angle-left pull-right"></i></span>
            </a>
            <ul class="treeview-menu">
                <li><a href="<%=basePath%>/repair/page"><i class="fa fa-circle-o"></i><span class="menuInfo">维修</span></a></li>
                <li><a href="<%=basePath%>/upkeep/page"><i class="fa fa-circle-o"></i><span class="menuInfo">保养</span></a></li>
                <li><a href="<%=basePath%>/install/page"><i class="fa fa-circle-o"></i><span class="menuInfo">安装</span></a></li>
           &lt;%&ndash;     <li><a href="<%=basePath%>/upkeepPlan/page"><i class="fa fa-circle-o"></i><span class="menuInfo">保养提醒</span></a></li>
                <li><a href="<%=basePath%>/train/page"><i class="fa fa-circle-o"></i><span class="menuInfo">培训</span></a></li>&ndash;%&gt;
            </ul>
        </li>
      &lt;%&ndash;  <li class="treeview">
            <a href="#">
                <i class="fa fa-newspaper-o"></i><span>培训管理</span> <span class="pull-right-container"> <i class="fa fa-angle-left pull-right"></i></span>
            </a>
            <ul class="treeview-menu">
                <li><a href="<%=basePath%>/train/page"><i class="fa fa-circle-o"></i><span class="menuInfo">培训记录</span></a></li>
            </ul>
        </li>&ndash;%&gt;
        <c:if test="${loginUser.type != 1101}">
            <li class="treeview">
                <a href="#">
                    <i class="fa fa-newspaper-o"></i><span>新闻管理</span> <span class="pull-right-container"> <i class="fa fa-angle-left pull-right"></i></span>
                </a>
                <ul class="treeview-menu">
                    <li><a href="<%=basePath%>/news/page"><i class="fa fa-circle-o"></i><span class="menuInfo">新闻</span></a></li>
                </ul>
            </li>
            <li class="treeview">
                <a href="#">
                    <i class="fa fa-gear"></i><span>系统管理</span> <span class="pull-right-container"> <i class="fa fa-angle-left pull-right"></i></span>
                </a>
                <ul class="treeview-menu">
                    <li><a href="<%=basePath%>/user/page"><i class="fa fa-circle-o"></i><span class="menuInfo">用户</span></a></li>
                    <li><a href="<%=basePath%>/hospital/page"><i class="fa fa-circle-o"></i><span class="menuInfo">医院</span></a></li>
                    <li><a href="<%=basePath%>/manufacturer/page"><i class="fa fa-circle-o"></i><span class="menuInfo">厂商</span></a></li>
                    <li><a href="<%=basePath%>/supplier/page"><i class="fa fa-circle-o"></i><span class="menuInfo">经销商</span></a></li>
                    <li><a href="<%=basePath%>/maintainer/page"><i class="fa fa-circle-o"></i><span class="menuInfo">维修商</span></a></li>
                </ul>
            </li>
        </c:if>
        <li class="treeview">
            <a href="#">
                <i class="fa fa-gear"></i><span>其他</span> <span class="pull-right-container"> <i class="fa fa-angle-left pull-right"></i></span>
            </a>
            <ul class="treeview-menu">
                <li><a href="http://gable-info.cn/ExhibitionWebSocket/webSocket/page?clientId=${loginUser.userId}&clientName=${loginUser.realName}&isSystem=1"><i class="fa fa-circle-o"></i><span class="menuInfo">群组会话</span></a></li>
            </ul>
        </li>
--%>


        <li class="header">设置</li>
        <!-- 判断用户是否绑定手机号码 -->
        <span class="hide">
			<c:if test="${phone == null}">
                <li><a href="<%=basePath%>/user/bindingPhone"><i class="fa fa-phone-square text-success"></i> <span>绑定(手机)</span></a></li>
            </c:if>
			<c:if test="${phone != null}">
                <li><a href="<%=basePath%>/user/replaceBindingPhone"><i class="fa fa-phone-square text-success"></i> <span>更换绑定(手机)</span></a></li>
            </c:if>
		</span>
        <li><a href="javascript:updetePassword()"><i class="fa fa-lock text-yellow"></i> <span>修改密码</span></a></li>
        <li><a href="javascript:logout()"><i class="fa fa-power-off text-red"></i> <span>退出登录</span></a></li>
    </ul>
</section>